package com.aspose.cells;

import java.util.Iterator;

class zbte extends zbz {
   zbte() {
      this.c(2198);
   }

   zbte(int var1) {
      this.c(2198);
      this.b(16);
      this.c = new byte[16];
      this.c[0] = -106;
      this.c[1] = 8;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var1), 0, this.c, 12, 4);
   }

   private static zcfx a(String var0, com.aspose.cells.a.f.zj var1) throws Exception {
      com.aspose.cells.a.f.zh var2 = var1.a(var0);
      var2.a(DateTime.getNow());
      var1.a(var2);
      zcfx var3 = new zcfx(var1, Encoding.getUTF8());
      var3.a((int)1);
      return var3;
   }

   private void a(com.aspose.cells.a.f.zi var1, com.aspose.cells.a.f.zj var2) throws Exception {
      Iterator var3 = var1.iterator();

      while(var3.hasNext()) {
         com.aspose.cells.a.f.zh var4 = (com.aspose.cells.a.f.zh)var3.next();
         if (!var4.c()) {
            this.a(var4, var4.b(), var1, var2);
         }
      }

   }

   private void a(com.aspose.cells.a.f.zh var1, String var2, com.aspose.cells.a.f.zi var3, com.aspose.cells.a.f.zj var4) throws Exception {
      com.aspose.cells.a.f.zh var5 = var4.a(var2);
      var5.a(DateTime.getNow());
      var4.a(var5);
      byte[] var6 = new byte[1024];
      boolean var7 = false;
      com.aspose.cells.b.a.d.zm var8 = var3.a(var1);

      int var9;
      do {
         var9 = var8.a(var6, 0, var6.length);
         var4.b(var6, 0, var9);
      } while(var9 > 0);

      var8.a();
      var4.b();
   }

   void a(Workbook var1) throws Exception {
      com.aspose.cells.b.a.d.zh var2 = new com.aspose.cells.b.a.d.zh();
      com.aspose.cells.a.f.zj var3 = new com.aspose.cells.a.f.zj(var2);
      com.aspose.cells.b.a.d.zh var4 = new com.aspose.cells.b.a.d.zh();
      byte[] var5 = com.aspose.cells.a.c.zv.b();
      var4.b(var5, 0, var5.length);
      var4.a(0L, 0);
      com.aspose.cells.a.f.zi var6 = com.aspose.cells.a.f.zi.a((com.aspose.cells.b.a.d.zm)var4);
      this.a(var6, var3);
      zcfx var7 = a("theme/theme/theme1.xml", var3);
      zua var8 = new zua(var1);
      var8.a(var7);
      var7.e();
      var3.f_();
      if (var2.h() + 16L <= 8224L) {
         this.a((short)((int)(var2.h() + 16L)));
         this.c = new byte[this.d()];
         this.c[0] = -106;
         this.c[1] = 8;
         System.arraycopy(var2.m(), 0, this.c, 16, (int)var2.h());
      }

   }

   void a(zqa var1) throws Exception {
      if (this.d() != 0) {
         byte[] var2 = new byte[4];
         System.arraycopy(com.aspose.cells.b.a.zc.a(this.f()), 0, var2, 0, 2);
         System.arraycopy(com.aspose.cells.b.a.zc.a(this.d()), 0, var2, 2, 2);
         var1.a(var2);
         var1.a(this.c);
      }
   }
}
